SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 66871: Dates read in from a Google BigQuery database might show a difference from what is stored in the database

DetailsHotfixAboutRate It

When you read in a Google BigQuery table that contains a variable that is defined as a date data type, the date in SAS® might be different from what was stored in the database. This issue occurs in the following cases:

  • Dates between 29FEB4000 and 28FEB8000 show a one-day difference.
  • Dates after 28FEB8000 show a two-day difference.
  • Dates with a year between 01JAN0100 and 31DEC1582 show ******* when displayed and are internally stored as a non-missing value.
  • Dates with a year < 100 show ******* when displayed and are internally stored as a date that does not correspond to a date with years 2001-2099. 

This issue occurs when you use BULKUNLOAD=YES to read in the table. The issue arises because SAS does not consider years divisible by 4000 as being leap years and the BigQuery database does.

The only workaround is to use BULKUNLOAD=NO to read in the table when you have dates with a year 4000 or later or outside of the range of dates that SAS supports.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS/ACCESS Interface to Google BigQuery (on SAS Viya)Linux for x642020.0.42020.1.2ViyaViya
SAS SystemSAS/ACCESS Interface to Google BigQueryLinux for x649.429.429.4 TS1M79.4 TS1M8
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.